﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

public class SendMT
{
    public string PhoneNumber { get; set; }
    public string Content { get; set; }
    protected SendMTService smsService;
    public SendMT()
    {
    }
    public SendMT(SendMTService smsService)
    {
        this.smsService = smsService;
    }
    public static int RULE_AMOUNT_IN_DAY = 3;
    public virtual MtResponse SendMessage()
    {
        if (smsService != null && !this.PhoneNumber.IsNullOrEmpty() && !this.Content.IsNullOrEmpty())
        {
            this.PhoneNumber = PhoneNumber.FormatPhonenumberStartWith84();
            MtResponse mtResponse = new MtResponse();
            mtResponse.Response = smsService.Send(this.PhoneNumber, this.Content);
            return mtResponse;
        }
        return new MtResponse();
    }
}
